<%@ page import="com.example.oa.Employee" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 23333
  Date: 2023/3/11
  Time: 19:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>员工信息修改页面</title>
</head>
<%--<%--%>
<%--  Employee employee = (Employee) session.getAttribute("employee");--%>
<%--%>--%>
<body>
<h1>员工信息修改页面</h1>
<form action="/OA" method="post">
  <input type="hidden" name="action" value="update">
  <input type="hidden" name="id" value="${sessionScope.employee.id}">
  <br>
  <label>姓名：
    <input type="text" name="name" placeholder="NAME" value="${sessionScope.employee.name}" disabled="disabled">
  </label>
  <br>
  <label>年龄：
    <input type="number" name="age" placeholder="AGE" value="${sessionScope.employee.age}">
  </label>
  <br>
  <label>
    Gender:
      <input type="radio" name="gender" value="M" ${sessionScope.employee.gender == "M"?"checked":""}>Male
      <input type="radio" name="gender" value="F" ${sessionScope.employee.gender == "M"?"":"checked"}>Female
  </label>
  <br>
  <input type="submit" value="提交修改">
</form>
<p style="color: #FF0000">
  <%
    String message = (String) request.getAttribute("message");
    if (message != null){
      out.print(message);
    }
  %>
</p>
</body>
</html>
